package com.sc.nft.controller;

import com.sc.nft.annotation.UserLogin;
import com.sc.nft.feign.WxMiniPointsRuleClient;
import com.sc.nft.req.pointsrule.PointsRuleReq;
import com.sc.nft.sup.Result;
import com.sc.nft.vo.pointsrule.PointsRuleDetailsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/ipMall/wxMiniMall/user/pointsRule")
@Api(tags = "用户端小程序积分规则")
public class WxMiniPointsRuleController {

    private final WxMiniPointsRuleClient wxMiniPointsRuleClient;


    /**
     * 小程序用户积分查看规则
     * @return
     */
    @PostMapping(value = "/webGetRule", produces = MediaType.APPLICATION_JSON_VALUE)
    @ApiOperation(value = "小程序用户积分查看规则")
    @UserLogin
    public Result<String> webGetRule() {
        return wxMiniPointsRuleClient.webGetRule();
    }



}